home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2010 May / Mac Life Ubuntu.iso / casper / filesystem.squashfs / usr / share / gimp / 2.0 / help / en / gimp-using-animated-brushes.html < prev    next >
Encoding:
Extensible Markup Language  |  2008-05-03  |  24.3 KB  |  586 lines

  1. <?xml version="1.0" encoding="UTF-8" standalone="no"?>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4.   <head>
  5.     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  6.     <title>8.¬† The GIH Dialog Box</title>
  7.     <link rel="stylesheet" href="gimp-help-plain.css" type="text/css" />
  8.     <link rel="stylesheet" href="gimp-help-screen.css" type="text/css" />
  9.     <link rel="stylesheet" href="gimp-help-custom.css" type="text/css" />
  10.     <link rel="alternate stylesheet" href="gimp22.css" type="text/css" title="gimp22" />
  11.     <meta name="generator" content="DocBook XSL Stylesheets V1.73.2" />
  12.     <link rel="start" href="index.html" title="GNU Image Manipulation Program" />
  13.     <link rel="up" href="gimp-painting.html" title="Chapter¬†7.¬† Painting with GIMP" />
  14.     <link rel="prev" href="gimp-using-brushes.html" title="7.¬† Adding New Brushes" />
  15.     <link rel="next" href="gimp-using-variable-size-brush.html" title="9.¬† Varying brush size" />
  16.   </head>
  17.   <body>
  18.     <div class="navheader">
  19.       <table width="100%" summary="Navigation header">
  20.         <tr>
  21.           <th colspan="3" align="center">8.¬†
  22.     <span lang="en" xml:lang="en">The GIH Dialog Box</span>
  23.   </th>
  24.         </tr>
  25.         <tr>
  26.           <td width="20%" align="left"><a accesskey="p" href="gimp-using-brushes.html"><img src="../images/prev.png" alt="Prev" /></a>¬†</td>
  27.           <th width="60%" align="center">Chapter¬†7.¬†
  28.         <span lang="en" xml:lang="en">Painting with GIMP</span>
  29.       </th>
  30.           <td width="20%" align="right">¬†<a accesskey="n" href="gimp-using-variable-size-brush.html"><img src="../images/next.png" alt="Next" /></a></td>
  31.         </tr>
  32.       </table>
  33.       <hr />
  34.     </div>
  35.     <div class="sect1" lang="en" xml:lang="en">
  36.       <div class="titlepage">
  37.         <div>
  38.           <div>
  39.             <h2 class="title" style="clear: both"><a id="gimp-using-animated-brushes"></a>8.¬†
  40.     <span lang="en" xml:lang="en">The GIH Dialog Box</span>
  41.   </h2>
  42.           </div>
  43.           <div>
  44.             <div class="revhistory">
  45.               <table border="1" width="100%" summary="Revision history">
  46.                 <tr>
  47.                   <th align="left" valign="top" colspan="3">
  48.                     <b>Revision History</b>
  49.                   </th>
  50.                 </tr>
  51.                 <tr>
  52.                   <td align="left">Revision $Revision: 2437 $</td>
  53.                   <td align="left">2007-07-15</td>
  54.                   <td align="left">romanofski</td>
  55.                 </tr>
  56.               </table>
  57.             </div>
  58.           </div>
  59.         </div>
  60.       </div>
  61.       <a id="id2595052" class="indexterm"></a>
  62.       <p>
  63.     When your new animated brush is created, it is displayed within the image
  64.     window and you would like save it into a gih format. You select
  65.     <span class="guimenu">File</span> ‚Üí <span class="guimenuitem">Save as...</span>
  66.     menu, name your work with the gih extension in the new window relevant
  67.     field and as soon as you pressed the Save button, the following window is
  68.     displayed:
  69.   </p>
  70.       <div class="figure">
  71.         <a id="id2595092"></a>
  72.         <p class="title">
  73.           <b>Figure¬†7.18.¬†
  74.       <span lang="en" xml:lang="en">The dialog to describe the animated brush.</span>
  75.     </b>
  76.         </p>
  77.         <div class="figure-contents">
  78.           <div class="mediaobject">
  79.             <img src="../images/using/file-gih-save.png" alt="The dialog to describe the animated brush." />
  80.             <div class="caption">
  81.               <p>
  82.           This dialog box shows up, if you save an image as GIMP image hose
  83.         </p>
  84.             </div>
  85.           </div>
  86.         </div>
  87.       </div>
  88.       <br class="figure-break" />
  89.       <p>
  90.     This dialog box has several options not easy to understand. They allow you
  91.     to determine the way your brush is animated.
  92.   </p>
  93.       <div class="variablelist">
  94.         <dl>
  95.           <dt>
  96.             <span class="term">Spacing (Percent)</span>
  97.           </dt>
  98.           <dd>
  99.             <p>
  100.           "Spacing" is the distance between consecutive brush marks when you
  101.           trace out a brushstroke with the pointer. You must consider drawing
  102.           with a brush, whatever the paint tool, like stamping. If Spacing is
  103.           low, stamps will be very close and stroke look continuous. If
  104.           spacing is high, stamps will be separated: that's interesting with a
  105.           color brush (like "green pepper" for instance). Value varies from 1
  106.           to 200 and this percentage refers to brush "diameter": 100% is one
  107.           diameter.
  108.         </p>
  109.           </dd>
  110.           <dt>
  111.             <span class="term">Description</span>
  112.           </dt>
  113.           <dd>
  114.             <p>
  115.           It's the brush name that will appear at the top of Brush Dialog
  116.           (grid mode) when the brush is selected.
  117.         </p>
  118.           </dd>
  119.           <dt>
  120.             <span class="term">Cell Size</span>
  121.           </dt>
  122.           <dd>
  123.             <p>
  124.           That's size of cells you will cut up in layers... Default is one
  125.           cell per layer and size is that of the layer. Then there is only
  126.           one brush aspect per layer.
  127.         </p>
  128.             <p>
  129.           We could have only one big layer and cut up in it the cells that
  130.           will be used for the different aspects of the animated brush.
  131.         </p>
  132.             <p>
  133.           For instance, we want a 100x100 pixels brush with 8 different
  134.           aspects. We can take these 8 aspects from a 400x200 pixels layer,
  135.           or from a 300x300 pixels layer but with one cell unused.
  136.         </p>
  137.           </dd>
  138.           <dt>
  139.             <span class="term">Number of cells</span>
  140.           </dt>
  141.           <dd>
  142.             <p>
  143.           That's the number of cells (one cell per aspect) that will be cut
  144.           in every layer. Default is the number of layers as there is only
  145.           one layer per aspect.
  146.         </p>
  147.           </dd>
  148.           <dt>
  149.             <span class="term">Display as:</span>
  150.           </dt>
  151.           <dd>
  152.             <p>
  153.           This tells how cells have been arranged in layers. If, for example,
  154.           you have placed height cells at the rate of two cells per layer on
  155.           four layers, GIMP will display: "1 rows of 2 columns on each layer".
  156.         </p>
  157.           </dd>
  158.           <dt>
  159.             <span class="term">Dimension, Ranks, Selection</span>
  160.           </dt>
  161.           <dd>
  162.             <p>
  163.           There things are getting complicated! Explanations are necessary to
  164.           understand how to arrange cell and layers.
  165.         </p>
  166.             <p>
  167.           GIMP starts retrieving cells from each layer and stacks them into a
  168.           FIFO stack (First In First Out: the first in is at the top of the
  169.           stack and so can be first out). In our example 4 layers with 2 cells
  170.           in each, we'll have, from top to bottom: first cell of first layer,
  171.           second cell of first layer, first cell of second layer, second cell
  172.           of second layer..., second cell of fourth layer. With one cell per
  173.           layer or with several cells per layer, result is the same. You can
  174.           see this stack in the Layer Dialog of the resulting .gih image file.
  175.         </p>
  176.             <p>
  177.           Then GIMP creates a computer array from this stack with the
  178.           <span class="guilabel">Dimensions</span>
  179.           you have set. You can use four dimensions.
  180.         </p>
  181.             <p>
  182.           In computer science an array has a "myarray(x,y,z)" form for a 3
  183.           dimensions array (3D). It's easy to imagine a 2D array: on a paper
  184.           it's an array with rows and columns
  185.           </p>
  186.             <div class="mediaobject">
  187.               <img src="../images/using/array2D.png" />
  188.             </div>
  189.             <p>
  190.           With a 3d array we don't talk rows and columns but
  191.           <span class="guilabel">Dimensions</span> and
  192.           <span class="guilabel">Ranks</span>.
  193.           The first dimension is along x axis, the second dimension along y
  194.           axis, the third along z axis. Each dimension has ranks of cells.
  195.           </p>
  196.             <div class="mediaobject">
  197.               <img src="../images/using/array3D.png" />
  198.             </div>
  199.             <p>
  200.         </p>
  201.             <p>
  202.           To fill up this array, GIMP starts retrieving cells from the top of
  203.           stack. The way it fills the array reminds that of an odometer: right
  204.           rank digits turn first and, when they reach their maximum, left rank
  205.           digits start running. If you have some memories of Basic programming
  206.           you will have, with an array(4,2,2), the following succession:
  207.           (1,1,1),(1,1,2),(1,2,1),(1,2,2),(2,1,1),(2,1,2),(2,2,2),(3,1,1)....
  208.           (4,2,2). We will see this later in an example.
  209.         </p>
  210.             <p>
  211.           Besides the rank number that you can give to each dimension, you can
  212.           also give them a
  213.           <span class="guilabel">Selection</span>
  214.           mode. You have several modes that will be applied when drawing:
  215.           </p>
  216.             <div class="itemizedlist">
  217.               <ul type="disc">
  218.                 <li>
  219.                   <p>
  220.                 <span class="emphasis"><em>Incremental</em></span>
  221.                 : GIMP selects a rank from the concerned dimension according
  222.                 to the order ranks have in that dimension
  223.               </p>
  224.                 </li>
  225.                 <li>
  226.                   <p>
  227.                 <span class="emphasis"><em>Random</em></span>
  228.                 : GIMP selects a rank at random from the concerned dimension.
  229.               </p>
  230.                 </li>
  231.                 <li>
  232.                   <p>
  233.                 <span class="emphasis"><em>Angular</em></span>
  234.                 : GIMP selects a rank in the concerned dimension according to
  235.                 the moving angle of the brush.
  236.               </p>
  237.                   <p>
  238.                 The first rank is for the direction 0¬∞, upwards. The other
  239.                 ranks are affected, counter clockwise, to an angle whose value
  240.                 is 360/number of ranks. So, with 4 ranks in the concerned
  241.                 dimension, the angle will move 90¬∞ counterclockwise for each
  242.                 direction change: second rank will be affected to 270¬∞ (-90¬∞)
  243.                 (leftwards), third rank to 180¬∞ (downwards) and fourth rank to
  244.                 90¬∞ (rightwards).
  245.               </p>
  246.                 </li>
  247.                 <li>
  248.                   <p>
  249.                 <span class="emphasis"><em>Speed</em></span>, <span class="emphasis"><em>Pressure</em></span>,
  250.                 <span class="emphasis"><em>x tilt</em></span> and <span class="emphasis"><em>y tilt</em></span>
  251.                 are options for sophisticated drawing tablets.
  252.               </p>
  253.                 </li>
  254.               </ul>
  255.             </div>
  256.             <p>
  257.         </p>
  258.           </dd>
  259.         </dl>
  260.       </div>
  261.       <div class="variablelist">
  262.         <p class="title">
  263.           <b>
  264.       <span lang="en" xml:lang="en">Examples</span>
  265.     </b>
  266.         </p>
  267.         <dl>
  268.           <dt>
  269.             <span class="term">A one dimension image pipe</span>
  270.           </dt>
  271.           <dd>
  272.             <p>
  273.         Well! What is all this useful for? We'll see that gradually with
  274.         examples. You can actually place in each dimension cases that will
  275.         give your brush a particular action.
  276.       </p>
  277.             <p>
  278.         Let us start with a 1D brush which will allow us to study selection
  279.         modes action. We can imagine it like this:
  280.         </p>
  281.             <div class="mediaobject">
  282.               <img src="../images/using/array1D.png" />
  283.             </div>
  284.             <p>
  285.         Follow these steps:
  286.         </p>
  287.             <div class="orderedlist">
  288.               <ol type="1">
  289.                 <li>
  290.                   <p>
  291.               Open a new 30x30 pixels image, RGB with Transparent fill type.
  292.               Using the Text tool create 4 layers "1", "2", "3", "4". Delete
  293.               the "background" layer.
  294.             </p>
  295.                 </li>
  296.                 <li>
  297.                   <p>
  298.               Save this image first with .xcf extension to keep its properties
  299.               then save it as .gih.
  300.             </p>
  301.                 </li>
  302.                 <li>
  303.                   <p>
  304.               The Save As Dialog is opened: select a destination for your
  305.               image. OK. The GIH dialog is opened: Choose Spacing 100, give a
  306.               name in Description box, 30x30 for Cell Size, 1 dimension, 1
  307.               rank and choose "Incremental" in Selection box. OK.
  308.             </p>
  309.                 </li>
  310.                 <li>
  311.                   <p>
  312.               You may have difficulties to save directly in the GIMP Brush
  313.               directory. In that case, save the <code class="filename">.gih</code>
  314.               file manually into the
  315.               <code class="filename">/usr/share/gimp/gimp 2.0/brushes</code>
  316.               directory. Then come back into the Toolbox, click in the brush
  317.               icon to open the Brush Dialog then click on "Refresh". Your new
  318.               brush appears in the Brush window. Select it. Select pencil tool
  319.               for instance and click and hold with it on a new image
  320.               </p>
  321.                   <div class="mediaobject">
  322.                     <img src="../images/using/1234incr.png" />
  323.                   </div>
  324.                   <p>
  325.               You see 1, 2, 3, 4 digits following one another in order.
  326.             </p>
  327.                 </li>
  328.                 <li>
  329.                   <p>
  330.               Take your .xcf image file back and save it as .gih setting
  331.               Selection to "Random": digits will be displayed at random
  332.               order:
  333.               </p>
  334.                   <div class="mediaobject">
  335.                     <img src="../images/using/1234rand.png" />
  336.                   </div>
  337.                   <p>
  338.             </p>
  339.                 </li>
  340.                 <li>
  341.                   <p>
  342.               Now select "Angular" Selection:
  343.               </p>
  344.                   <div class="mediaobject">
  345.                     <img src="../images/using/1234angl.png" />
  346.                   </div>
  347.                   <p>
  348.             </p>
  349.                 </li>
  350.               </ol>
  351.             </div>
  352.             <p>
  353.       </p>
  354.           </dd>
  355.           <dt>
  356.             <span class="term">A 3 dimensions image hose</span>
  357.           </dt>
  358.           <dd>
  359.             <p>
  360.           We are now going to create a 3D animated brush: its orientation will
  361.           vary according to brush direction, it will alternate Left/Right
  362.           hands regularly and its color will vary at random between black and
  363.           blue.
  364.         </p>
  365.             <p>
  366.           The first question we have to answer to is the number of images that
  367.           is necessary. We reserve the first dimension (x) to the brush
  368.           direction (4 directions). The second dimension (y) is for Left/Right
  369.           alternation and the third dimension (z) for color variation. Such a
  370.           brush is represented in a 3D array "myarray(4,2,2)":
  371.           </p>
  372.             <div class="mediaobject">
  373.               <img src="../images/using/3Dnum.png" />
  374.             </div>
  375.             <p>
  376.           There are 4 ranks in first dimension (x), 2 ranks in second
  377.           dimension (y) and 2 ranks in third dimension (z). We see that there
  378.           are 4x2x2 = 16 cells. We need 16 images.
  379.         </p>
  380.             <div class="orderedlist">
  381.               <ol type="1">
  382.                 <li>
  383.                   <p>
  384.               <span class="emphasis"><em>Creating images of dimension 1 (x)</em></span>:
  385.               Open a new 30x30 pixels image, RGB with Transparent Fill Type.
  386.               Using the zoom draw a left hand with fingers upwards. Save it as
  387.               handL0k.xcf (hand Left O¬∞ Black).
  388.             </p>
  389.                   <p>
  390.               Open the Layer Dialog. Double click on the layer to open the
  391.               Layer Attributes Dialog and rename it to handL0k.
  392.             </p>
  393.                   <p>
  394.               Duplicate the layer. Let visible only the duplicated layer,
  395.               select it and apply a 90¬∞ rotation (Layer/Transform/ 90¬∞
  396.               rotation counter-clockwise). Rename it to handL-90k.
  397.             </p>
  398.                   <p>
  399.               Repeat the same operations to create handL180k and handL90k.
  400.             </p>
  401.                 </li>
  402.                 <li>
  403.                   <p>
  404.               <span class="emphasis"><em>Creating images of dimension 2 (y)</em></span>:
  405.               This dimension in our example has two ranks, one for left hand
  406.               and the other for right hand. The left hand rank exists yet. We
  407.               shall build right hand images by flipping it horizontally.
  408.             </p>
  409.                   <p>
  410.               Duplicate the handL0k layer. Let it visible only and select it.
  411.               Rename it to handR0K. Apply Layer/Transform/Flip Horizontally.
  412.             </p>
  413.                   <p>
  414.               Repeat the same operation on the other left hand layers to
  415.               create their right hand equivalent.
  416.             </p>
  417.                   <p>
  418.               Re-order layers to have a counter-clockwise rotation from top to
  419.               bottom, alternating Left and Right: handL0k, handR0k, handL-90k,
  420.               handR-90k, ..., handR90k.
  421.             </p>
  422.                 </li>
  423.                 <li>
  424.                   <p>
  425.               <span class="emphasis"><em>Creating images of dimension 3 (z)</em></span>:
  426.               The third dimension has two ranks, one for black color and the
  427.               other for blue color. The first rank, black, exists yet. We well
  428.               see that images of dimension 3 will be a copy, in blue, of the
  429.               images of dimension 2. So we will have our 16 images. But a row
  430.               of 16 layers is not easy to manage: we will use layers with two
  431.               images.
  432.             </p>
  433.                   <p>
  434.               Select the handL0k layer and let it visible only. Using
  435.               Image/Canvas Size change canvas size to 60x30 pixels.
  436.             </p>
  437.                   <p>
  438.               Duplicate hand0k layer. On the copy, fill the hand with blue
  439.               using Bucket Fill tool.
  440.             </p>
  441.                   <p>
  442.               Now, select the Move tool. Double click on it to accede to its
  443.               properties: check "Move the Current Layer" option. Move the blue
  444.               hand into the right part of the layer precisely with the help of
  445.               Zoom.
  446.             </p>
  447.                   <p>
  448.               Make sure only handL0k and its blue copy are visible. Right
  449.               click on the Layer Dialog: Apply the "Merge Visible Layers"
  450.               command with the option "Expand as Necessary". You get a 60x30
  451.               pixels layer with the black hand on the left and the blue hand
  452.               on the right. Rename it to "handL0".
  453.             </p>
  454.                   <p>
  455.               Repeat the same operations on the other layers.
  456.             </p>
  457.                 </li>
  458.                 <li>
  459.                   <p>
  460.               <span class="emphasis"><em>Set layers in order</em></span>: Layers must be set in
  461.               order so that GIMP can find the required image at some point
  462.               of using the brush. Our layers are yet in order but we must
  463.               understand more generally how to have them in order.There are
  464.               two ways to imagine this setting in order. The first method is
  465.               mathematical: GIMP divides the 16 layers first by 4; that gives
  466.               4 groups of 4 layers for the first dimension. Each group
  467.               represents a direction of the brush. Then, it divides each group
  468.               by 2; that gives 8 groups of 2 layers for the second dimension:
  469.               each group represents a L/R alternation. Then another division
  470.               by 2 for the third dimension to represent a color at random
  471.               between black and blue.
  472.             </p>
  473.                   <p>
  474.               The other method is visual, by using the array representation.
  475.               Correlation between two methods is represented in next image:
  476.               </p>
  477.                   <div class="mediaobject">
  478.                     <img src="../images/using/correlation.png" />
  479.                   </div>
  480.                   <p>
  481.             </p>
  482.                   <p> 
  483.               <span class="emphasis"><em>How will GIMP read this array?</em></span>: GIMP
  484.               starts with the first dimension which is programmed for
  485.               ‚Äú<span class="quote">angular</span>‚Äù, for instance -90¬∞. In this -90¬∞
  486.               rank, in yellow, in the second dimension, it selects a L/R
  487.               alternation, in an ‚Äú<span class="quote">incremental</span>‚Äù way. Then,
  488.               in the third dimension, in a random way, it chooses a color.
  489.               Finely, our layers must be in the following order:
  490.               </p>
  491.                   <div class="mediaobject">
  492.                     <img src="../images/using/hands_gih.png" />
  493.                   </div>
  494.                   <p>
  495.             </p>
  496.                 </li>
  497.                 <li>
  498.                   <p>
  499.               Voil√†. Your brush is ready. Save it as .xcf first then as .gih
  500.               with the following parameters: Spacing:100 Description:Hands
  501.               Cell Size: 30x30 Number of cells:16 Dimensions: 3
  502.             </p>
  503.                   <div class="itemizedlist">
  504.                     <ul type="disc">
  505.                       <li>
  506.                         <p>
  507.                   Dimension 1: 4 ranks Selection: Angular
  508.                 </p>
  509.                       </li>
  510.                       <li>
  511.                         <p>
  512.                   Dimension 2: 2 ranks Selection: Incremental
  513.                 </p>
  514.                       </li>
  515.                       <li>
  516.                         <p>
  517.                   Dimension 3: 2 ranks Selection: Random
  518.                 </p>
  519.                       </li>
  520.                     </ul>
  521.                   </div>
  522.                   <p>
  523.               Place your .gih file into GIMP brush directory and refresh the
  524.               brush box. You can now use your brush.
  525.             </p>
  526.                   <div class="figure">
  527.                     <a id="id2596018"></a>
  528.                     <p class="title">
  529.                       <b>Figure¬†7.19.¬†
  530.                 <span lang="en" xml:lang="en">
  531.                   Here is the result by stroking an elliptical selection
  532.                   with the brush:
  533.                 </span>
  534.               </b>
  535.                     </p>
  536.                     <div class="figure-contents">
  537.                       <div class="mediaobject">
  538.                         <img src="../images/using/hands_stroke.png" alt="Here is the result by stroking an elliptical selection with the brush:" />
  539.                         <div class="caption">
  540.                           <p>
  541.                     This brush alternates right hand and left hand regularly,
  542.                     black and blue color at random, according to four brush
  543.                     directions.
  544.                   </p>
  545.                         </div>
  546.                       </div>
  547.                     </div>
  548.                   </div>
  549.                   <br class="figure-break" />
  550.                 </li>
  551.               </ol>
  552.             </div>
  553.           </dd>
  554.         </dl>
  555.       </div>
  556.     </div>
  557.     <div class="navfooter">
  558.       <hr />
  559.       <table width="100%" summary="Navigation footer">
  560.         <tr>
  561.           <td width="40%" align="left"><a accesskey="p" href="gimp-using-brushes.html"><img src="../images/prev.png" alt="Prev" /></a>¬†</td>
  562.           <td width="20%" align="center">
  563.             <a accesskey="u" href="gimp-painting.html">
  564.               <img src="../images/up.png" alt="Up" />
  565.             </a>
  566.           </td>
  567.           <td width="40%" align="right">¬†<a accesskey="n" href="gimp-using-variable-size-brush.html"><img src="../images/next.png" alt="Next" /></a></td>
  568.         </tr>
  569.         <tr>
  570.           <td width="40%" align="left" valign="top"><a accesskey="p" href="gimp-using-brushes.html">7.¬†
  571.     <span lang="en" xml:lang="en">Adding New Brushes</span>
  572.   </a>¬†</td>
  573.           <td width="20%" align="center">
  574.             <a accesskey="h" href="index.html">
  575.               <img src="../images/home.png" alt="Home" />
  576.             </a>
  577.           </td>
  578.           <td width="40%" align="right" valign="top">¬†<a accesskey="n" href="gimp-using-variable-size-brush.html">9.¬†
  579.     <span lang="en" xml:lang="en">Varying brush size</span>
  580.   </a></td>
  581.         </tr>
  582.       </table>
  583.     </div>
  584.   </body>
  585. </html>
  586.